import { DatetimePicker ,Popup  } from 'vant';

export default {
    data(){
     return {
        datePickerShow:false,
        minDate: new Date(1920, 0, 1),
        maxDate: new Date(),
        
     }
    },
    components:{
        [DatetimePicker.name]:DatetimePicker,
        [Popup.name]:Popup
      },
      methods:{
        datePickerConfirm(e){
            console.log(e);//  日期对象
            // this.userInfo.sex = e;

             let year = e.getFullYear();
             let month = e.getMonth()+1;
             let date = e.getDate();

           let d =   [year,month,date].map(v=>{
                 return (v+'').length>1?v:'0'+v
             }).join('/')
             this.userInfo.birthday = d;
            this.datePickerShow = false;
        
           },
      }
}